package com.bytz.modules.cms.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bytz.modules.cms.c4c.model.C4cGetContacts;
import com.bytz.modules.cms.order.entity.Order;
import com.bytz.modules.cms.order.model.OrderModel;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 订单服务类
 */
public interface IMallOrderService {

    /**
     * 经销商分页查询自己的订单
     */
    IPage<OrderModel> pageByReseller(OrderModel order, Page<Order> page, HttpServletRequest request);

    /**
     * 经销商查询单条
     */
    OrderModel queryById(String id);

    /**
     * 暂存订单
     */
    OrderModel saveOrder(OrderModel model);

    /**
     * 下单
     */
    OrderModel placeOrder(OrderModel model);

    /**
     * 提交ec审批材料
     */
    Boolean submitEcAuditFile(OrderModel orderModel);

    /**
     * 用id删除
     */
    Boolean removeById(String id);

    /**
     * 经销商上传双章合同
     */
    Boolean uploadContract(OrderModel order);


    /**
     * 根据shipToId从c4c中获取联系人
     * @param shipToId endUserId
     * @return C4cGetContacts
     */
    List<C4cGetContacts> getContactsByEndUserId(String shipToId);
}
